<script type="text/javascript">
$().ready(function() {
	// validate signup form on keyup and submit
	$("#frm_news").validate({
		rules: {
			news_name: "required",
            
            news_email: {
				required: true,
				email: true
			}
        },
		messages: {
			news_name: "*",      
            news_email: "*"            
		}
	});	
});
</script>
<?php //var_dump($news); ?>
<div class="temp1"></div>
<script>
function show_(id)
{
		for(i=1; i<4;i++){
			if(i==id){
				jQuery('#banner_home_'+i).fadeIn('slow');
				jQuery("#box_tip_home_"+i).addClass('active');
			}
			else{
				document.getElementById('banner_home_'+i).style.display = "none";
				jQuery("#box_tip_home_"+i).removeClass('active');
			}
		}
}
</script>
<div style="display:none">
<img src="<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[0]['image'] ?>" />
<img src="<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[1]['image'] ?>" />
<img src="<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[2]['image'] ?>" />
</div>
<div class="intro_home">   
     <div id="banner_home_1" style="display: block; width: 700px;height: 243px; background: url(<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[0]['image'] ?>) no-repeat;z-index:1;"></div>
                
                <div id="banner_home_2" style="display: none; width: 700px;height: 243px; background: url(<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[1]['image'] ?>) no-repeat;z-index:1;"></div>
                <div id="banner_home_3" style="display: none; width: 700px;height: 243px; background: url(<?php echo base_url(); ?>upload_file/slideshow/<?php echo $banners[2]['image'] ?>) no-repeat;z-index:1;"></div>
                
                <div class="box_tip_home" style="position: relative;">
                    <div id="box_tip_home_1" class="box_tip_home_1" style="cursor: pointer;" onclick="show_(1);">
                        <div class="box_tip_home_text_1">
                            <div class="f16px"><?php echo $banners[0]['title'] ?></div>
                            <div><?php echo $banners[0]['content'] ?></div>
                        </div>
                    </div>
                    <div id="box_tip_home_2" class="box_tip_home_2" style="cursor: pointer;" onclick="show_(2);">
                        <div class="box_tip_home_text_2">
                            <div class="f16px"><?php echo $banners[1]['title'] ?></div>
                            <div><?php echo $banners[1]['content'] ?></div>
                        </div>
                    </div>
                    <div id="box_tip_home_3" class="box_tip_home_3" style="cursor: pointer;" onclick="show_(3);">
                        <div class="box_tip_home_text_3">
                            <div class="f16px"><?php echo $banners[2]['title'] ?></div>
                            <div><?php echo $banners[2]['content'] ?></div>
                        </div>
                    </div>
                    <div class="clear_left"></div>
                </div>
</div>

<div class="content">
   
    <div class="text_home">
        <div class="text_home1">
            <div class="p10r">
             <div class="title_home">
                <?php echo $tab[0]['title'] ?>
            </div>
            <div class="title"><?php echo $tab[0]['intro'] ?></div>
            <div class="p15t">
			<?php echo str_replace("../../../../","../",$tab[0]['content']) ?>
            </div>
            </div>
        </div>
        <div class="text_home2">
            <div class="title_home_1">
                <?php echo $this->lang->line('text_shortcuts'); ?>
            </div>
            <div class="box_home">
                <div class="p15t"><img src="<?php echo base_url(); ?>assets/img/icon_01.png" />&nbsp;<a href="#">asd  as d sd sa d sads dasd sa ds ad sdsa sa d asd s dsa </a></div>
                <div class="p15t"><img src="<?php echo base_url(); ?>assets/img/icon_01.png" />&nbsp;<a href="#">asd  as d sd sa d sads dasd sa ds ad sdsa sa d asd s dsa </a></div>
                
                <div class="p15t"><img src="<?php echo base_url(); ?>assets/img/icon_01.png" />&nbsp;<a href="#">asd  as d sd sa d sads dasd sa ds ad sdsa sa d asd s dsa </a></div>
                <div class="p15t"><img src="<?php echo base_url(); ?>assets/img/icon_01.png" />&nbsp;<a href="#">asd  as d sd sa d sads dasd sa ds ad sdsa sa d asd s dsa </a></div>
                
            </div>
        </div>
        <div class="clear_left"></div>
    </div>
    
    <div class="news_home">
        <div class="news_home1">
            <?php
			if(count($news)>0)
			{
				foreach($news as $item)
				{
					$thedate=$item['thedate'];
					$month=strtoupper(date("M",$thedate));
					$day=date("d",$thedate);
			?>
            <div class="article">
                <div>
                    <div class="date">
                        <div class="date_text1"><?php echo $month;?></div>
                        <div class="date_text2"><?php echo $day;?></div>
                    </div>
                    <div class="aricle_title"><?php echo $item['title'];?></div>
                    <div class="clear_left"></div>
                </div>
                <div class="article_text">
                    <img src="<?php echo base_url(); ?>assets/auto_thumbnail/timthumb.php?src=<?php echo base_url(); ?>upload_file/article/<?php echo $item['picture']; ?>&h=55&w=80&zc=1" style="float:left; margin: 0 10px 10px 0;"/>
                    <p><?php echo $item['intro'];?></p>
                    <div class="clear-left"></div>
                </div>
                <div class="readmore">
                    <a href="<?php echo base_url().$this->lang->lang()."/".$this->lang->line('seo_news')."/".$item['id'].".html"; ?>"><?php echo $this->lang->line('text_readmore'); ?></a>
                </div>
                <div class="clear"></div>
            </div>
            <?php
				}
			}
			?>
            
        </div>
        <div class="news_home2">
            <div class="news_letter">
                <div class="news_letter_content">
                    <div class="news_title"><?php echo $this->lang->line('text_newsletter'); ?></div>
                    <form name="frm_news" id="frm_news" action="<?php echo base_url().$this->lang->lang(); ?>/news_send.html" method="post">
                    <div class="p15t from_newsletter">
                        <div class="p10b">
                        <?php
						if($this->session->flashdata('message'))
						{
							echo $this->session->flashdata('message');
						}
						?>
                            <p>It has survived not only five centuries, but also the leap into</p>
                        </div>
                        
                        <label><?php echo $this->lang->line('text_name'); ?></label><br />
                        <input type="text" name="news_name" id="news_name" value=""/><br />
                        <label><?php echo $this->lang->line('text_email'); ?></label><br />
                        <input type="text" name="news_email" id="news_email" value=""/><br />
                    </div>
                    <div class="p15t" style="float: right;">
                        <input type="image" src="<?php echo base_url(); ?>assets/img/bt_submit.jpg" name="send"/>
                    </div>
                    </form>
                </div>
            </div>
              
        </div>
        <div class="clear_left"></div>
    </div>

</div>
<script>
jQuery(document).ready(function(){
	jQuery("#home_active").addClass('current');
	show_(1);
});
</script>